package com.yhn.init.bizmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 订单生产者(销售人员将创建好的订单发送给设计师)
 *
 * @author yhn
 * @version 1.0
 * @description
 * @date 2024/3/15 10:11
 */
@Component
public class OrderMqProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;

    /**
     * 发送消息
     *
     * @param message 消息(订单ID)
     */
    public void sendMessage(String message) {
        rabbitTemplate.convertAndSend(message);
    }
}
